class practise3 {
  def transformList(list: List[Int]): List[Int] = {
    list.map(x => if (x % 2 == 0) x / 2 else x + 1)
    return list;
  }
  def main(args:Array[String]): Unit ={
    val ls=List(1,2,8,10)
    print(transformList(ls))
  }
}
